home *** CD-ROM | disk | FTP | other *** search
- (*----------------------------------------------------------------------*)
- (* PibDownLoad.Pas --- File Download Routines for PibTerm *)
- (*----------------------------------------------------------------------*)
- (* *)
- (* Author: Philip R. Burns *)
- (* Copyright (c) October, 1985. *)
- (* *)
- (* Version: 1.0 (January, 1985) *)
- (* 2.0 (July, 1985) *)
- (* 3.0 (October, 1985) *)
- (* *)
- (* Systems: For MS-DOS on IBM PCs and close compatibles only. *)
- (* Note: I have checked these on Zenith 151s under *)
- (* MSDOS 2.1 and IBM PCs under PCDOS 2.0. *)
- (* *)
- (* Needs: The Menu routines from MENUS.PAS, the communications *)
- (* routines from ASYNC.PAS, and some global variables from *)
- (* PIBTERM.PAS. *)
- (* *)
- (* History: Original with me, but the XMODEM is based upon the *)
- (* famous (X)MODEM(7) programs of Christiansen, et. al. *)
- (* Note that both the Checksum and CRC versions of XMODEM *)
- (* are available here. *)
- (* *)
- (* Version 2.0 added the TELINK, MODEM7, & YMODEM protocols, *)
- (* as well as autodownloads from Bob Mahoney's Exec PC BBS. *)
- (* *)
- (* Version 3.0 added Kermit. Parts of the Kermit code were *)
- (* adapted from a CP/M version by Jeff Duncan. *)
- (* *)
- (* Suggestions for improvements or corrections are welcome. *)
- (* Please leave messages on Gene Plantz's BBS (312) 882 4145 *)
- (* or Ron Fox's BBS (312) 940 6496. *)
- (* *)
- (* If you use this code in your own programs, please be nice *)
- (* and give proper credit. *)
- (* *)
- (*----------------------------------------------------------------------*)
- (* *)
- (* Restriction *)
- (* ----------- *)
- (* *)
- (* You may use this code only for NON COMMERCIAL purposes *)
- (* unless you explicitly obtain my permission. I take a dim *)
- (* view of others making money on my work and those of other *)
- (* people whose code I've inserted here. *)
- (* *)
- (*----------------------------------------------------------------------*)
- (* *)
- (* Routines: *)
- (* *)
- (* PibDownLoad --- Main control routine *)
- (* *)
- (* Receive_Ascii_File --- Receive Ascii file from another computer *)
- (* Receive_Xmodem_File --- Receive file with XMODEM family *)
- (* Receive_Modem7_File --- Batch file download with MODEM7, TELINK *)
- (* Receive_Kermit_File --- Receive file with Kermit (stub only) *)
- (* Get_Download_Protocol --- Determines type of transfer *)
- (* *)
- (*----------------------------------------------------------------------*)
-
- (*----------------------------------------------------------------------*)
- (* PibDownLoad --- Control routine for downloads *)
- (*----------------------------------------------------------------------*)
-
- OVERLAY PROCEDURE PibDownLoad( Transfer_Protocol : Transfer_Type );
-
- (*----------------------------------------------------------------------*)
- (* *)
- (* Procedure: PibDownload *)
- (* *)
- (* Purpose: Controls downloading of files from remote hosts. *)
- (* *)
- (* Calling Sequence: *)
- (* *)
- (* PibDownLoad( Transfer_Protocol : Transfer_Type ); *)
- (* *)
- (* Transfer_Protocol --- the type of transfer protocol *)
- (* be used; if None is given, then *)
- (* a prompt is issued for the transfer *)
- (* protocol. *)
- (* *)
- (* Remarks: *)
- (* *)
- (* Currently, the only available protocols are: *)
- (* *)
- (* Ascii file transfer (no error-correction) *)
- (* Xmodem with Checksum *)
- (* Xmodem with CRC *)
- (* Ymodem *)
- (* Ymodem batch *)
- (* Modem7 (Batch Xmodem) *)
- (* Telink *)
- (* Kermit *)
- (* *)
- (* Calls: Receive_Ascii_File *)
- (* Receive_Xmodem_File *)
- (* Receive_Kermit_File *)
- (* Receive_Modem7_File *)
- (* Get_Download_Protocol *)
- (* *)
- (*----------------------------------------------------------------------*)
-
- VAR
- OK_Init : BOOLEAN;
- I : INTEGER;